home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3dm / audio / alGetEventValue.z / alGetEventValue
Encoding:
Text File  |  1998-10-20  |  5.0 KB  |  133 lines

  1.  
  2.  
  3.  
  4. aaaallllGGGGeeeettttEEEEvvvveeeennnnttttVVVVaaaalllluuuueeee((((3333ddddmmmm))))                                      aaaallllGGGGeeeettttEEEEvvvveeeennnnttttVVVVaaaalllluuuueeee((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      alGetEventValue - get ALvalue of audio event
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiioooo....hhhh>>>>
  13.  
  14.      AAAALLLLvvvvaaaalllluuuueeee aaaallllGGGGeeeettttEEEEvvvveeeennnnttttVVVVaaaalllluuuueeee((((AAAALLLLeeeevvvveeeennnntttt eeeevvvveeeennnntttt))))
  15.  
  16.  
  17. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR
  18.      _e_v_e_n_t   expects an AAAALLLLeeeevvvveeeennnntttt structure initialized by aaaallllNNNNeeeexxxxttttEEEEvvvveeeennnntttt((((3333ddddmmmm)))) or
  19.              aaaallllCCCChhhheeeecccckkkkEEEEvvvveeeennnntttt((((3333ddddmmmm)))).
  20.  
  21. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  22.      aaaallllGGGGeeeettttEEEEvvvveeeennnnttttVVVVaaaalllluuuueeee returns the event data information as an ALvalue union
  23.      from the AAAALLLLeeeevvvveeeennnntttt structure.
  24.  
  25.      As with aaaallllGGGGeeeettttPPPPaaaarrrraaaammmmssss((((3333ddddmmmm)))), the ALvalue type will depend on the parameter.
  26.      For a complete list of event parameters and their data types, refer to
  27.      aaaallllPPPPaaaarrrraaaammmmssss((((3333ddddmmmm)))).   The event parameter can be retrieved through
  28.      aaaallllGGGGeeeettttEEEEvvvveeeennnnttttPPPPaaaarrrraaaammmm((((3333ddddmmmm)))).
  29.  
  30.      It is important to note that non-scalar data type parameters will use
  31.      different calls for event data retrieval:  aaaallllGGGGeeeettttEEEEvvvveeeennnnttttDDDDaaaattttaaaa((((3333ddddmmmm)))) and
  32.      aaaallllGGGGeeeettttPPPPaaaarrrraaaammmmssss((((3333ddddmmmm)))).  Again, please refer to aaaallllPPPPaaaarrrraaaammmmssss((((3333ddddmmmm)))) for more
  33.      information.
  34.  
  35.  
  36. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  37.      The following example demonstrates how to retrieve the event data
  38.      information of an event with an AL_RATE parameter.
  39.  
  40.      ALeventQueue eventq;
  41.      ALevent      event;
  42.      ALvalue      value;
  43.           .
  44.           .
  45.           .
  46.      /*
  47.       * Get event from event queue
  48.       */
  49.      status = alNextEvent(eventq,event);
  50.      if(status == -1) {
  51.           fprintf(stderr,"Error retrieving event: %s",
  52.           alGetErrorString(oserror()));
  53.      }
  54.  
  55.      /*
  56.       * Process the event.
  57.       */
  58.      switch(alGetEventParam(event)) {
  59.      case AL_RATE:
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. aaaallllGGGGeeeettttEEEEvvvveeeennnnttttVVVVaaaalllluuuueeee((((3333ddddmmmm))))                                      aaaallllGGGGeeeettttEEEEvvvveeeennnnttttVVVVaaaalllluuuueeee((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74.          value = alGetEventValue(event);
  75.          fprintf(stdout,"New Rate: %lf\n",
  76.          alFixedToDouble(value.ll));
  77.          break;
  78.           .
  79.           .
  80.           .
  81.      }
  82.  
  83. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  84.      Upon successful completion, aaaallllGGGGeeeettttEEEEvvvveeeennnnttttVVVVaaaalllluuuueeee((((3333ddddmmmm)))) returns an ALvalue union
  85.      with the particular event information.  Otherwise, it returns an ALvalue
  86.      with its field set to zero, and sets an error number. This error number
  87.      can be retrieved with oooosssseeeerrrrrrrroooorrrr((((3333CCCC)))).
  88.  
  89.      aaaallllGGGGeeeettttEEEEvvvveeeennnnttttVVVVaaaalllluuuueeee can fail for the following reason:
  90.  
  91.      AAAALLLL____BBBBAAAADDDD____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEEVVVVEEEENNNNTTTT   _e_v_e_n_t is invalid or null.
  92.  
  93. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  94.      alNewEvent(3dm), alNextEvent(3dm), alCheckEvent(3dm), alParams(3dm),
  95.      alGetEventData(3dm), alGetParams(3dm), oserror(3C)
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.